import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/pages/login/index.vue"),
  },
  {
    path: "/",
    name: "home",
    component: () => import("@/pages/home/index.vue"),
    children: [
      {
        path: "/crew",
        name: "crew",
        component: () => import("@/pages/crew/index.vue"),
      },
      {
        path: "/user",
        name: "user",
        component: () => import("@/pages/user/index.vue"),
      },
      {
        path: "/role",
        name: "role",
        component: () => import("@/pages/role/index.vue"),
      },
    ],
  },
];
const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
